<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="fragments/layout(title='结算-收费单详细信息',cssPaths='/static/css/financial/settlement/detail.css',jsPaths='/static/plugins/qrcode.min.js,/static/js/financial/settlement/detail.js')">
<div class="right" th:fragment="right">
            <!--面包屑-->
            <div class="breadcrumb layui-bg-gray">
                <span class="layui-breadcrumb" lay-separator=">">
                    <a th:href="@{/}">首页</a>
                       <a href="/receipt">收费管理</a>
                        <a href="/settlement">结算</a>
                        <a><cite>结算详情</cite></a>
                </span>
            </div>

            <!--主体内容区-->
            <div class="form-content">
                <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                    <legend>待收费项目( 所属人：<span th:text="${param.elderlyName}"></span>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        身份证号码：<span th:text="${param.elderlyIdNo}"></span>)</legend>
                </fieldset>
                <div class="receipt-list">
                    <div th:each="r:${receipts}" class="receipt-item layui-row">
                        <div class="field layui-col-md2">
                            <span>时间：</span>
                            <span class="value" th:text="${#dates.format(r.createdTime, 'yyyy-MM-dd')}"></span>
                        </div>
                        <div class="field layui-col-md4">
                            <span>收费项目：</span>
                            <span id="name" th:text="${r.name}"></span>
                        </div>
                        <div class="field layui-col-md2">
                            <span>应收金额：</span>
                            <span th:text="'￥' + ${r.amount}"></span>
                        </div>
                        <div class="field layui-col-md2">
                            <span>状态：</span>
                            <span class="value" th:if="${r.status == 1}" >待支付</span>
                            <span class="value" th:if="${r.status == 3}" >已支付</span>
                            <span class="value" th:if="${r.status == 4}" >逾期</span>
                            <span class="value" th:if="${r.status == 5}" >作废</span>
                        </div>
                        <div class="field layui-col-md12" th:if="${r.type eq 3}" style="margin-top: 15px;">
                            <span>收费内容：</span>
                            <span class="value" th:each="item : ${r.receiptItemsList}">
                                <span th:text="'￥'+ ${item.monery}+'/'"></span>
                                <span th:text="${item.name}"></span>
                                <span style="display: inline-block;width: 15px;">&nbsp;</span>
                            </span>
                        </div>
                    </div>
                </div>
                <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                    <legend>总计</legend>
                </fieldset>

                <div class="monery-box field">
                    <span>应收总额:</span>
                    <span class="monery" th:text="'￥' + ${sum}"></span>
                </div>
                <input type="hidden" id="monery" th:value="${sum}">
                <input type="hidden" id="elderlyName" th:value="${param.elderlyName}">
                <input type="hidden" id="elderlyId" th:value="${param.elderlyId}">
                <input type="hidden" id="elderlyIdNo" th:value="${param.elderlyIdNo}">
                <input type="hidden" id="curr" th:value="${curr}">
                <input type="hidden" id="orgId" th:value="${session.organization.id}">
                <input type="hidden" id="orgName" th:value="${session.organization.name}">
                <a  href="javascript:" class="layui-btn sf" data-type="3">现金收费</a>
                <a  href="javascript:" class="layui-btn sf" data-type="1">在线收费</a>
                <a  href="javascript:" class="layui-btn" id="send">远程收费</a>
                <a  href="/settlement" class="layui-btn">返回</a>
            </div>
    <div style="display: none;" id="qrcodeWrap">
        <div id="info" style="margin: 10px;"></div>
        <div id="qrcode" style="margin: 10px;"></div>
    </div>
</div>

</html>